// ----------------------------------------------------------------------------
/**
	File: conduitpacking.cpp
	Author: Zef RosnBrick
	Archive: Live Archive
	Problem Number: 4448
*/
// ----------------------------------------------------------------------------

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <complex>
#include <cmath>

#define EPS 1E-10

using namespace std;

#define sq(a) ((a) * (a))
#define law_of_cosines(a, b, c) acos(min(max((sq(a) + sq(b) - sq(c)) / (2 * (a) * (b)), -1.0), 1.0))

double r[4], th[4];

bool place(int i, double rad)
{
	if (i == 4)
		return true;
	else if (rad < r[i] - EPS)
		return false;
	else
		th[i] = 0.0;

	for (int j = 0; j < i; j++)
		th[i] = max(th[i], th[j] + law_of_cosines(rad - r[j], rad - r[i], r[j] + r[i]));

	for (int j = 0; j < i; j++)
		if (abs(polar(rad - r[j], th[j]) - polar(rad - r[i], th[i])) < r[j] + r[i] - EPS)
			return false;

	return place(i + 1, rad);
}

double bin_search(double lo, double hi)
{
	double rad = (hi + lo) / 2.0;
	if (abs(hi - lo) < EPS)
		return 2.0 * rad;

	sort(r, r + 3);
	do
	{
		if (place(0, rad))
			return bin_search(lo, rad);
	} while (next_permutation(r, r + 3));

	return bin_search(rad, hi);
}

int main()
{
	int caseno = 0;
	double sum;

	while (++caseno)
	{
		if (!(cin >> r[0] >> r[1] >> r[2] >> r[3]) || r[0] == 0)
			return 0;

		sum = 0.0;
		for (int i = 0; i < 4; i++)
			sum += (r[i] /= 2.0);

		printf("Case %i: %.0f\n", caseno, bin_search(0.0, sum));
	}
}
